home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / edit / wced19c.zip / WCED.DOC < prev    next >
Text File  |  1994-09-10  |  13KB  |  411 lines

  1. Wced 1.9c Command Line Editor
  2.  
  3. Copyright (C) 1990-1994 Stuart Russell (WormSoft)
  4.  
  5. Introduction
  6. ------------
  7.  
  8. Wced is a command line editor. Features include a history of
  9. commands typed, aliasing of commands (with parameters), filename
  10. completion and command line editing. The main aim of Wced is to
  11. improve the command line editing of DOS but use as little memory as 
  12. possible. When installed, wced uses approximately 14k of 
  13. conventional memory. Wcedlite performs like Wced but has no alias
  14. functions.
  15.  
  16. Important
  17. ---------
  18.  
  19. In order for some of Wced's functions to work Wced must be in a directory
  20. that is specified in the PATH. A very cryptic message is displayed by DOS
  21. if this is not the case!!
  22. Wced takes a copy of the PATH to use when performing CompShowPath. Before
  23. loading Wced the PATH should contain all the directories to be searched
  24. when performing CompShowPath.
  25.  
  26. Command Line Options
  27. --------------------
  28.  
  29. Usage
  30.           wced [-acdflqt] [-wmethod] [-Hsize] [-Asize] [-S] [filename]
  31.  
  32. Options
  33.  
  34.   a -    Filenames are listed in alphabetical order.
  35.  
  36.   c -    Makes the history list circular. Normally command completion
  37.     stops at either end of the history list. 
  38.  
  39.   d -    Directories in lists have a trailing '\'.
  40.  
  41.   f -    Treat the first word specially when using CompleteShow. See Filename
  42.     Completion.
  43.  
  44.   l -    All filenames are listed in lowercase.
  45.  
  46.   q -    The bell is not sounded when the start or end of the
  47.     history list is reached.
  48.  
  49.   t -    Translate the wced command buffer to make it DOS compatible.
  50.     See Removing the Trailing Slash.
  51.  
  52.   w -    This describes the method used to move between words. See Word
  53.     Method.
  54.  
  55.   H -    This specifies the size of the history buffer. See History and Alias
  56.     Size.
  57.  
  58.   A -    This specifies the size of the alias table. See History and Alias
  59.     Size.
  60.  
  61.   S -    Save the history and aliases to the specified file. See Saving the
  62.     History and Aliases.
  63.  
  64. Word Method
  65. -----------
  66.  
  67. The 'w' option controls how Wced interprets words. This affects the
  68. MoveWordLeft, MoveWordRight and DeleteWordLeft keys. There are currently
  69. four methods.
  70.  
  71. 0 Wced (default)
  72.  
  73. Words are delimited by changes between white-space, alphanumerics and
  74. punctuation.
  75.  
  76. 1 Unix
  77.  
  78. Words are delimited by changes between white-space and other characters.
  79.  
  80. 2 Edit
  81.  
  82. A word is any non white-space and the white-space preceeding or following
  83. it depending on the direction of movement.
  84.  
  85. 3 Emacs (Bash)
  86.  
  87. A word begins with an alphanumeric.
  88.  
  89. History and Alias Size
  90. ----------------------
  91.  
  92. The size is specified in bytes but is rounded down to the nearest
  93. paragraph, 16 bytes, when the space is allocated. Hence the maximum
  94. size is 32572 bytes. The minimum size for the History List is 512
  95. bytes. The minimum size for the Alias Table is 256 bytes.
  96.  
  97. The default size of the History List is 2048 bytes. The default size
  98. of the Alias Table is 1024 bytes.
  99.  
  100. Saving the History and Aliases
  101. ------------------------------
  102.  
  103. The history and aliases are saved to the specified file in the
  104. correct format to be read in by a later invocation of Wced. Wced does
  105. not become resident and the other options are ignored.
  106.  
  107. Reading Initial Commands and Aliases
  108. ------------------------------------
  109.  
  110. If a filename exists on the command line Wced will attempt to read
  111. initial commands and/or aliases from the file. The alias definitions
  112. within the file have the following format:
  113.  
  114.     alias aliastext fulltext 
  115.  
  116. For example, 'alias d dir %*' aliases 'd' to 'dir'. Subsequently, if 
  117. 'd' is the first word on the command line then it is substituted with
  118. 'dir'.
  119.  
  120. Any line not beginning with 'alias' is treated as a command and is 
  121. placed into the history list.
  122.  
  123. Alias Parameters
  124. ----------------
  125.  
  126. The aliases can have parameters in their definitions. For 
  127. example,
  128.  
  129.     alias ld hotdir %0 /d/2
  130.  
  131. aliases 'ld' to 'hotdir %0 /d/2'. The %0 will be replaced with the 
  132. first argument given on the command line, ie.
  133.  
  134.     C:>ld list.*
  135.  
  136. will result in DOS executing
  137.  
  138.     hotdir list.* /d/2
  139.  
  140. Another example shows how all arguments can be used.
  141.  
  142.     alias del del %* /p
  143.  
  144. This aliases 'del' to 'del %* /p'. The %* will be replaced by all 
  145. arguments on the command line, ie.
  146.  
  147.     del tom dick harry
  148.  
  149. will result in DOS executing
  150.  
  151.     del tom dick harry /p
  152.  
  153. The parameters can also be used in definitions entered from the 
  154. command line (as described below).
  155.  
  156. The Editing and History functions
  157. ---------------------------------
  158.  
  159. The default editing and history keys are :
  160.  
  161. MoveBegin      Home           Move to beginning of command line
  162. MoveEnd           End            Move to end of command line
  163. MoveRight      Right Arrow    Move cursor right one place along command line
  164. MoveLeft       Left Arrow     Move cursor left one place along command line
  165. MoveWordLeft   Ctrl-Left      Move cursor left to end of word
  166. MoveWordRight  Ctrl-Right     Move cursor right to end of word
  167. HistoryLast    Up Arrow       Move backwards (older) through history
  168. HistoryNext    Down Arrow     Move forwards (newer) through history
  169. DeleteLine     Alt-d          Delete entire command line
  170. DeleteThis     Del            Delete character under cursor on command line
  171. DeleteLast     BS             Delete character before cursor on command line
  172. Quit           Alt-x          Quit and uninstall Wced
  173. HistoryRemove  Alt-r          Remove entry on command line from history
  174. Version           Alt-v          Print version
  175. DeletetoBegin  Alt-b          Delete to beginning of command line
  176. DeletetoEnd    Alt-e          Delete to end of command line
  177. NoExecute      Ctrl-c         Store but do not execute command on command line
  178. DeleteWordLeft Ctrl-BS        Delete the word to the left of the cursor
  179.  
  180. Each function can have two keys assigned to it.
  181.  
  182. Wced only operates in insert mode - there is no overtype mode.
  183.  
  184. The history commands will attempt to complete the command on the 
  185. command line. An example is shown below.
  186. Assume the history contains
  187.  
  188.     ls
  189.     cd backup
  190.     less nogood
  191.     larn
  192.     worm <--- Most recent
  193.  
  194. If the user now does
  195.  
  196.     C:>l_<UPARROW>
  197.  
  198. then the command line will be completed as
  199.  
  200.     C:>larn_
  201.  
  202. with the cursor on the end of the line.
  203. If the <UPARROW> is pressed again the command line becomes
  204.  
  205.     C:>less nogood_
  206.  
  207. and again ...
  208.  
  209.     C:>ls_
  210.  
  211. The cursor is always placed at the end of the line. The feedback 
  212. I have received suggests that people prefer this. If Wced can not 
  213. complete the command it will sound the bell assuming the 'q' flag 
  214. has not been specified.
  215.  
  216. The Alias functions (NOT available in wcedlite)
  217. -----------------------------------------------
  218.  
  219. The alias functions of wced are accessed using Alt-a. The action 
  220. taken depends on the contents of the command line. If the command 
  221. line is empty then a list of current aliases is printed. If the 
  222. command line contains only one word then this is assumed to be an 
  223. alias that is to be removed from the alias table. If the alias 
  224. can not be matched then an error message is printed. If the 
  225. command line contains more than one word then the alias is added 
  226. to the alias table replacing a previous alias if necessary. Some 
  227. examples follow.
  228.  
  229. Adding:
  230.  
  231.     C:>l ls %*<ALT-a>
  232.     C:>pkv pkunzip -vb %*<ALT-a>
  233.  
  234. This adds the aliases l and pkv to the alias table.
  235. Listing:
  236.  
  237.     C:><ALT-a>
  238.     l = ls %*
  239.     pkv = pkunzip -vb %*
  240.  
  241. This prints the current aliases.
  242.  
  243. Deleting:
  244.  
  245.     C:>l<ALT-a>
  246.  
  247. This deletes an entry from the alias table.
  248.  
  249.     C:><ALT-a>
  250.     pkv = pkunzip -vb %*
  251.  
  252. Aliases may contain multiple commands seperated by the ComSep
  253. character(s). These can be changed using Wkeys.
  254.  
  255. For example:
  256.  
  257.     C:>cd cd %0 ^ls<ALT-a>
  258.     C:>cd fred<Return>
  259.  
  260. This will change into the directory 'fred' and then list the files in the
  261. directory.
  262. NOTE: The space between %0 and ^ above is very important. If the argument
  263. replacing %0 has a trailing slash then the space ensures it will be removed,
  264. assuming Wced was invoked with the 't' option.
  265.  
  266. Filename Completion/Show
  267. ------------------------
  268.  
  269. The filename completion/show functions are assigned to :
  270.  
  271. Show          Alt-s      Show possible filename completions
  272. CompShow      Tab        Attempt to complete filename/show possible 
  273.                          completions
  274. CompShowPath  Ctrl-Tab   Complete/Show matching files on PATH
  275.  
  276. Filenames will be completed as far as possible. When the 
  277. completion becomes ambiguous the possible matching files 
  278. will be displayed. For example consider the following files.
  279.  
  280.     backup\   buffer.c  buffer.h  buffer.obj
  281.     list.c    list.h    list.obj
  282.     wced.exe  wced.doc  wced17.zip
  283.  
  284. Pressing <Tab> on an empty line will produce a listing of the 
  285. entire directory contents.
  286.  
  287.     C:><Tab>
  288.     backup\   list.c    wced.doc
  289.     buffer.c  list.h    wced.exe
  290.     buffer.h  list.obj  wced17.zip
  291.     buffer.obj
  292.  
  293. The filename completion only completes the filename that the 
  294. cursor is at the end of. In the next example files beginning with 
  295. 'b' are searched for and the 'less ' is ignored.
  296. The filename can not be completed further so the possiblities are 
  297. listed.
  298.  
  299.     C:>less b<Tab>
  300.     backup\   buffer.c  buffer.h  buffer.obj
  301.  
  302. The command line is unaltered and ready for more of the filename 
  303. to be given.
  304.  
  305.     C:>less b_
  306.     C:>less bu<Tab>
  307.  
  308. Now the 'u' has been given the filename can be completed further.
  309.  
  310.     C:>less buffer._
  311.  
  312. The filename again can not be completed further so the 
  313. possibilities are listed.
  314.  
  315.     C:>less buffer.<Tab>
  316.     buffer.c  buffer.h  buffer.obj
  317.     C:>less buffer._
  318.  
  319. The user adds the required extension in this case.
  320.  
  321.      C:>less buffer.h
  322.  
  323. If a filename is completed uniquely a space is added after the name.
  324. If a directory is completed uniquely a backward slash is added after
  325. the name.
  326.  
  327. The 'f' option alters the behaviour of CompleteShow (Tab). If this
  328. option has been specified then when the cursor is at the end of the
  329. first word on the line and the CompleteShow key is pressed a
  330. CompleteShowPath is performed. You would normally have to use
  331. CompleteShowPath (Ctrl-Tab) to do this.
  332.  
  333. If the filename contains wildcards, * or ?, then the possible
  334. completions are listed when CompShow (Tab) or Show (Alt-s) is performed.
  335.  
  336. Removing the Trailing Slash
  337. ---------------------------
  338.  
  339. When using Filename Completion it is possible to complete a name such that
  340. it has a trailing slash. For example,
  341.  
  342.     C:>cd fred\_
  343.  
  344. If this line is passed to DOS 'cd' will moan and say something like
  345. 'Invalid directory'. This is because of the trailing slash. If you do not
  346. have a 'cd' command that is clever then you can specify the 't' option.
  347. This removes the trailing slash when necessary. For example,
  348.  
  349.     C:>cd fred\       becomes    C:>cd fred
  350.     C:>copy *.* a:\      stays as   C:>copy *.* a:\
  351.     C:>cd \           stays as   C:>cd \
  352.     C:>cd \fred\sid\  becomes    C:>cd \fred\sid
  353.  
  354. Using Wced with Windows
  355. -----------------------
  356.  
  357. There are two options when using Wced with Windows. By default if Wced
  358. is installed before starting Windows then every command typed in a
  359. DOS window is available in every other DOS window.
  360.  
  361. Instead of having one Wced for all DOS windows it is possible to have
  362. a Wced for each DOS window. To achieve this, change system.ini as
  363. below :
  364.  
  365.     [NonWindowsApp]
  366.     localtsrs=dosedit,wced
  367.  
  368. This makes a copy of the TSRs specified for each DOS window.
  369.  
  370. Acknowledgements
  371. ----------------
  372.  
  373. Any comments, problems or suggestions for additions should be 
  374. mailed to
  375.  
  376.     Stuart Russell
  377.     Woodlands
  378.     Back Lane
  379.     Meriden
  380.     Coventry
  381.     CV7 7LD
  382.  
  383. You can fax to + 44 676 534572. Please mark the fax clearly for the
  384. attention of Stuart Russell at PRS.
  385.  
  386. Many, many thanks to all those people who took the trouble to 
  387. comment and suggest improvements for Wced. Special thanks to Matthijs.
  388.  
  389.  
  390. Wkeys (v3.1) key programmer for Wced.
  391. -------------------------------------
  392.  
  393. The Wced program is accompanied by a program called Wkeys. This 
  394. allows Wced's keys to be reprogrammed to suite the user. Wkeys allows
  395. the use of the extended keys, ie F11, on an extended keyboard. The keys
  396. are defined in a data file. An example is supplied.
  397.  
  398. Usage:
  399.         wkeys [ datafile [ exefile ] ]
  400.  
  401. If an error occurs the exe file will not be updated. Hopefully a 
  402. helpfull error message will be printed to highlight the problem 
  403. in the input.
  404. If no input files are supplied then 'defaults.dat' and 'wced.exe'
  405. are assumed.
  406.  
  407. The CommandSeparator can be set to a one or two character string using
  408. any of '^&()~{}@'.
  409.  
  410. Each function can have two keys assigned to it.
  411.